﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
    var modules = ViewData["module"] as IEnumerable<YTCMS.Domain.Entities.cmscolumn>;
}
@model IEnumerable<YTCMS.Domain.Entities.content>
<div class="page-header">
    <h1>
        模块管理
        <small>
            <i class="icon-double-angle-right"></i>
            内容管理
        </small>
    </h1>
</div><!-- /.page-header -->

<div class="row">
    <div class="col-xs-12">
        <!-- PAGE CONTENT BEGINS -->
        <div class="panel panel-default">
            <div class="panel-heading">
                <h2><a class="btn btn-sm btn-warning" href="/Content/add"><i class="fa fa-plus"></i> 新增</a></h2>
                <div class="panel-actions">
                    <a href="table.html#" class="btn-setting"><i class="fa fa-rotate-right"></i></a>
                    <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                    <a href="table.html#" class="btn-close"><i class="fa fa-times"></i></a>
                </div>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-3">
                        <div class="dd" id="nestable">
                            <ol class="dd-list">
                                <li class="dd-item" data-id="1" value="">
                                    <div class="dd-handle" value="0" level="0">
                                        所有模块
                                        @*<div class="pull-right action-buttons">
                                                <a class="blue" href="javascript:void(0)" name="a_add" value="0" level="0">
                                                    <i class="icon-plus-sign bigger-130"></i>
                                                </a>
                                            </div>*@
                                    </div>
                                    <ol class="dd-list" id="item_ol">
                                        @foreach (var item in modules)
                                        {
                                            <li class="dd-item" data-id="2" value="@item.Id">
                                                <div class="dd-handle" value="@item.Id" level="1">
                                                    @item.Title
                                                    @*<div class="pull-right action-buttons">
                                                            <a class="blue" href="javascript:void(0)" name="a_add" value="@item.Id" level="1">
                                                                <i class="icon-plus-sign bigger-130 "></i>
                                                            </a>
                                                            <a class="pink" href="javascript:void(0)" name="a_edit" value="@item.Id" level="1">
                                                                <i class="icon-pencil bigger-130  "></i>
                                                            </a>
                                                            <a class="red" href="javascript:void(0)" name="a_delete" value="@item.Id" level="1">
                                                                <i class="icon-trash bigger-130"></i>
                                                            </a>
                                                        </div>*@
                                                </div>
                                            </li>
                                        }
                                    </ol>
                                </li>
                            </ol>
                        </div>
                    </div>
                    <div class="col-sm-9">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <a class="btn btn-warning btn-sm " href="/Content/add"><i class="icon-plus-sign bigger-120"></i>新增内容</a>
                            </div>
                            <div class="panel-body">
                                <div class="table-responsive" id="showData">
                                    @Html.Partial("List", Model)
                                </div><!-- /.table-responsive -->
                            </div>
                        </div>
                    </div>
                </div><!-- PAGE CONTENT ENDS -->
            </div>
        </div>

    </div><!-- /.col -->
</div><!-- /.row -->

<script type="text/javascript">
    $(function () {
        $("#item_ol li").click(function () {
            var that = $(this);
            $.btnClick({
                url: "/Content/Search",
                data: { mid: that.val() }
            })
        });
    })
</script>
